import React, { Component } from 'react'
import { View, Text, DeviceEventEmitter } from 'react-native'
import { connect } from 'react-redux' // 引入connect函数
import TabCom from './components/tab/index2.js'
import Forbiduser from '../../../components/forbiduser'

class Article extends Component {
	componentWillMount() {
		DeviceEventEmitter.addListener('forbid.user', () => {
			global.Pop.show(<Forbiduser wechat={this.props.serviceInfo.wechat} />,{animationType: 'slide-up'})
		})
	}
	render() {
		return (
				<View>
				<TabCom />
				</View>
		)
	}
}

export default connect(
	state => ({
		serviceInfo: state.login.serviceInfo
	})
)(Article)
